<template>
    <nuxt-link :to="`/doctor/detail/${info.id}`">
        <div class="doctor_cell">
            <div class="avatar">
                <li-image :src="info.logo" class="img" round v-if="info.logo" :alt="`${$cookies.get('city')}-${info.name}`"></li-image>
                <van-image :src="require('@/assets/images/avatar.png')" class="img" round lazy-load :alt="`${$cookies.get('city')}-${info.name}`" v-else />
                <img src="@/assets/images/rz.png" class="rz" alt="" v-if="info.hasCertified == 1" />
            </div>
            <div class="info">
                <div class="title">
                    <span class="name">{{ info.name }}</span>
                    <span class="sub">{{ info.personalTitle }}</span>
                </div>
                <div class="rate">
                    <span class="num">从业经验{{ info.workYears }}年</span>
                </div>
                <div class="tag_list">
                    <span class="name">擅长：</span>
                    <div class="tag" v-for="(citem, idx) in getProject(info.expertProject)" :key="`c_${idx}`">{{ citem }}
                    </div>
                </div>
            </div>
        </div>
    </nuxt-link>
</template>
<script>
export default {
    name: 'HospTeamDor',
    components: {
    },
    props: {
        info: {
            type: Object,
            default: function () {
                return {};
            },
        },
    },
    methods: {
        // 获取擅长项目
        getProject(str) {
            let arr = []
            if (!str) {
                return []
            }
            arr = str.split(',')
            return arr;
        }
    }
}
</script>
<style lang="less" scoped>
@import './doctor.less';
</style>